﻿using FarmSmartSleep.Common.Dtos;
using FarmSmartSleep.Organ.API.Application.TipsCommands;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace FarmSmartSleep.Organ.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class TipsController : ControllerBase
    {
        private readonly IMediator mediator;

        public TipsController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 配种提示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<Result> SearchBreedTip()
        {
            return await mediator.Send(new BreedTipsSearchCommand());
        }
        /// <summary>
        /// 妊检提示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<Result> SearchCheckTip()
        {
            return await mediator.Send(new  CheckTipSearchCommand());
        }
        /// <summary>
        /// 分娩提示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<Result> SearchGestTip()
        {
            return await mediator.Send(new GestTipsSearchCommand());
        }
    }
}
